import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios';
import ElementUI from 'element-ui';
import VueI18n from 'vue-i18n';
import 'element-ui/lib/theme-chalk/index.css';
// import '../static/css/theme-green/index.css';
import './assets/css/icon.css';
import './components/common/directives';
import "babel-polyfill";
import './assets/css/global.css';
import Print from '@/plugs/print';
import './assets/iconfont/iconfont.css';
import './assets/iconfont2/iconfont.css';
import './assets/svgIconFont/iconfont';
import '../src/plugs/math.diy.js';
import * as echarts from 'echarts';
// import 'echarts-gl';
import 'echarts-liquidfill';
import JsonExcel from 'vue-json-excel';
import Global from '@/Global.vue';
import vueToPdf from 'vue-to-pdf'
import dataV from '@jiaminghi/data-view'
import 'default-passive-events'
import 'animate.css'
import hasPermission from './utils/permission'
import config from '../public/config.js';

Vue.use(hasPermission)

Vue.use(dataV)

Vue.use(vueToPdf);



Vue.config.productionTip = false;
Vue.use(VueI18n);
Vue.use(ElementUI, {
    size: 'small'
});
Vue.prototype.$axios = axios;
Vue.use(Print);
Vue.prototype.$routes = router;
Vue.prototype.$echarts = echarts;
Vue.component('downloadExcel', JsonExcel);
Vue.prototype.GLOBAL = Global;
if(process.env.NODE_ENV == 'production') {
    window.console.warn = function () {}

    
}
// //处理Cannot read property 'catch' of undefined" 报错
// import VueRouter from 'vue-router'
// const routerPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push(location) {
//   return routerPush.call(this, location).catch(error=> error)
// }

// Vue.use(VueRouter)



new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')